package com.daotingli.springdemo.Controller.Config;

import lombok.Builder;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class Config {
    @Value("${spring.application.name}")
    private String appName;
    @Value("${server.port}")
    private String port;
    @Bean
    public String getAppName() {
        return appName;
    }
    @Bean
    public String getPort() {
        return port;
    }

}
